package main

import (
	"crypto/md5"
	"encoding/hex"
	"fmt"
	"io"
)

//md5加密
func genMd5(code string) string{
    Md5 := md5.New()
    _, _ = io.WriteString(Md5, code)
    return hex.EncodeToString(Md5.Sum(nil))
}

func main(){
	a := genMd5("123456")
	fmt.Println(a)
}